/**
 ** RAM选择器 -- 选择当前空闲的RAM提供写服务
**/
module writePicker (
    input wire [7:0] ram_idle,  
    output wire totle_busy,     
    output wire [7:0] pick_ram  
);
    //选择一空闲RAM
    assign pick_ram = ram_idle & (~(ram_idle-1));
    
    //整体忙信号
    assign totle_busy = ram_idle==0 ? 1'b1 : 1'b0;
endmodule